import numpy as np
from tqdm import  tqdm
# --------特征池的获取-------------

path = '/home/kai/project/video-caption-pytorch/data/feats/c3d_feats/'

all_feature = np.load('all_feature_8000.npy')
all_id = np.load('all_id_8000.npy')


for i in tqdm (range (8001,13000)):
     video_feature= np.load(path+'video'+str(i)+'.npy')
     vec_id = np.arange(all_feature.shape[0],video_feature.shape[0]+all_feature.shape[0])
     video_id = np.linspace(i, i, video_feature.shape[0])
     id_matrix_feature = np.vstack((vec_id,video_id)).T

     all_feature = np.vstack((all_feature, video_feature))
     all_id = np.vstack((all_id,id_matrix_feature))

     if i == 11000 :
          np.save('all_feature_'+str(i)+'.npy',all_feature)
          np.save('all_id'+str(i)+'.npy',all_id)

np.save('all_feature_13000.npy',all_feature)
np.save('all_id_13000.npy',all_id)